# 看看就行, 计算细节通用的数据


# region 增幅

# 增幅系数 = [0, 1, 2, 3, 4, 6, 8, 10, 12, 13, 17, 33, 50, 67, 108, 150, 192, 267, 342, 417, 500, 583, 667, 750, 833, 917, 1000, 1083, 1167, 1250, 1333, 1417]
# 增幅系数_HF = [0, 1, 2, 3, 4, 6, 8, 10, 22, 28, 35, 42, 50, 67, 108, 150, 192, 267, 342, 417, 500, 583, 667, 750, 833, 917, 1000, 1083, 1167, 1250, 1333, 1417]

增幅系数 = (0, 1, 2, 3, 4, 6, 8, 10, 22, 28, 35, 42, 50, 67, 108, 150, 192, 267,
        342, 417, 500, 583, 667, 750, 833, 917, 1000, 1083, 1167, 1250, 1333,
        1417)
增幅成长系数 = {'稀有': 1, '神器': 1.3, '勇者': 1.1, '传说': 1.4, '史诗': 1.5, '神话': 1.6}
增幅品级加分 = {'稀有': 45, '神器': 45, '勇者': 45, '传说': 46, '史诗': 46, '神话': 46}
# 增幅品级底数 = {'稀有': 5, '神器': 6, '勇者': 5, '传说': 6, '史诗': 7, '神话': 8}
# 增幅品级底数_HF = {'稀有': 10, '神器': 11, '勇者': 10, '传说': 11, '史诗': 12, '神话': 13}
增幅品级底数 = {'稀有': 10, '神器': 11, '勇者': 10, '传说': 11, '史诗': 12, '神话': 13}


def 增幅计算(装备等级, 品质, 强化等级, 版本='GF'):
    if 版本 == 'GF':
        if 品质 == "智慧产物":
            return 0
        #     return int((装备等级 + 增幅品级加分[品质]) * 增幅成长系数[品质] * 增幅系数[强化等级] / 100 - 0.00000001) + 增幅品级底数[品质]
        # else:
        return int((装备等级 + 增幅品级加分[品质]) * 增幅成长系数[品质] * 增幅系数[强化等级] / 100 -
                   0.00000001) + 增幅品级底数[品质] + (0 if 强化等级 < 12 else 5)


# endregion

# region 特殊装备&勋章

耳环强化系数 = (0, 83, 124, 166, 207, 248, 314, 370, 426, 482, 621, 970, 1455, 1941,
          2911, 4043, 5175, 7116, 9056, 10997, 13099, 15363, 17627, 19891,
          22155, 24420, 26684, 28948, 31212, 33476, 35740, 38004)
左右强化系数 = (0, 60, 90, 120, 150, 180, 210, 247, 285, 322, 360, 675, 1013, 1350,
          2025, 2813, 3600, 4950, 6300, 7650, 9113, 10688, 12263, 13838, 15413,
          16988, 18563, 20138, 21713, 23288, 24863, 26438)
勋章强化系数 = (0, 100, 120, 144, 173, 208, 250, 300, 320, 360, 400, 610, 1220, 2440,
          2684, 2952, 3838, 4989, 6486, 8432, 10962)
特殊成长系数 = {
    '普通': 0.4,
    '高级': 0.7,
    '稀有': 1,
    '神器': 1.25,
    '传说': 1.35,
    '史诗': 1.45,
    '神话': 1.55
}
特殊品级加分 = {'普通': 24, '高级': 30, '稀有': 26, '神器': 28, '传说': 29, '史诗': 30, '神话': 31}


def 耳环计算(装备等级, 品质, 强化等级):
    if 品质 == "智慧产物":
        return 0
    return int((装备等级 + 特殊品级加分[品质]) / 2400 * 特殊成长系数[品质] * 耳环强化系数[强化等级])


def 左右计算(装备等级, 品质, 强化等级):
    if 品质 == "智慧产物":
        return 0
    return int((装备等级 + 特殊品级加分[品质]) / 2400 * 特殊成长系数[品质] * 左右强化系数[强化等级])


def 勋章计算(装备等级, 品质, 强化等级):
    return int((装备等级 + 特殊品级加分[品质]) / 2400 * 特殊成长系数[品质] * 勋章强化系数[强化等级])

# endregion

# region 武器

武器强化系数 = (0, 2, 2.6, 3.6, 4.7, 5.8, 6.9, 8.2, 11, 14.6, 18.7, 26.9, 36.7, 43,
          49.2, 55.4, 61.7, 68, 74.3, 80.6, 86.9, 93.2, 99.5, 105.8, 112.1,
          118.3, 124.6, 130.9, 137.1, 143.4, 149.7, 156.0)
武器锻造系数 = (0, 2, 3, 4, 6, 8, 13, 18, 25, 32, 41)
武器成长系数 = {
    '普通': 0.4,
    '高级': 0.7,
    '稀有': 1,
    '神器': 1.25,
    '勇者': 1.1,
    '传说': 1.35,
    '史诗': 1.45,
    '神话': 1.55
}
武器品级加分 = {
    '普通': 8,
    '高级': 8,
    '稀有': 10,
    '神器': 12,
    '勇者': 11,
    '传说': 13,
    '史诗': 14,
    '神话': 15
}
武器类型系数 = {
    '短剑': (1.095, 1.115),
    '太刀': (1.095, 1.105),
    '钝器': (1.11, 1.095),
    '巨剑': (1.12, 1.09),
    '光剑': (1.093, 1.09),
    '手套': (1.095, 1.115),
    '臂铠': (1.12, 1.09),
    '爪': (1.1, 1.1),
    '拳套': (1.105, 1.095),
    '东方棍': (1.095, 1.1),
    '左轮枪': (1.087, 1.077),
    '自动手枪': (1.064, 1.094),
    '步枪': (1.1, 1.085),
    '手炮': (1.106, 1.064),
    '手弩': (1.075, 1.085),
    '矛': (1.12, 1.085),
    '棍棒': (1.108, 1.09),
    '魔杖': (1.09, 1.11),
    '法杖': (1.095, 1.12),
    '扫把': (1.1, 1.11),
    '十字架': (1.1, 1.095),
    '念珠': (1.09, 1.115),
    '图腾': (1.105, 1.09),
    '镰刀': (1.105, 1.105),
    '战斧': (1.12, 1.085),
    '匕首': (1.09, 1.089),
    '双剑': (1.102, 1.08),
    '手杖': (1.081, 1.115),
    '苦无': (1.09, 1.11),
    '长枪': (1.105, 1.09),
    '战戟': (1.12, 1.085),
    '光枪': (1.095, 1.115),
    '暗矛': (1.095, 1.105),
    '长刀': (1.108, 1.09),
    '小太刀': (1.1, 1.1),
    '重剑': (1.12, 1.09),
    '源力剑': (1.095, 1.115),
    # todo
    '神弦弓': (1.1, 1.095),
    '玄机弓': (1.108, 1.09),
    '重弩': (1.12, 1.09),
    '妖影弓': (1.095, 1.1)
}


def 武器强化计算(装备等级, 品质, 强化等级, 武器类型, 类型):
    武器系数 = (武器类型系数[武器类型][0 if 类型 == '物理' else 1])
    return int((装备等级 + 武器品级加分[品质]) / 8 * 武器成长系数[品质] * 武器强化系数[强化等级] * 武器系数)


def 锻造计算(装备等级, 品质, 锻造等级):
    return round((装备等级 + 武器品级加分[品质]) / 8 * 武器成长系数[品质] * 武器锻造系数[锻造等级])


def 锻造四维(装备等级, 品质, 锻造等级):
    return round((装备等级 + 武器品级加分[品质]) / 80 * 武器成长系数[品质] * 武器锻造系数[锻造等级])


武器冷却惩罚系数 = {
    '短剑': (1, 1, 1),
    '太刀': (0.95, 0.95, 1),
    '钝器': (1, 1, 1),
    '巨剑': (1.05, 1, 1),
    '光剑': (0.9, 1, 1),
    '手套': (0.9, 1, 1),
    '臂铠': (1.05, 1, 1),
    '爪': (1, 1, 1),
    '拳套': (0.9, 1, 1),
    '东方棍': (1, 1, 1),
    '左轮枪': (0.95, 1, 1),
    '自动手枪': (0.9, 1, 1),
    '步枪': (1, 1, 1),
    '手炮': (1.05, 1, 1),
    '手弩': (0.9, 1, 1),
    '矛': (1, 0.95, 1),
    '棍棒': (0.95, 1, 1),
    '魔杖': (0.95, 1, 1),
    '法杖': (1, 1.05, 1),
    '扫把': (1, 1, 1),
    '十字架': (1, 0.95, 1),
    '念珠': (0.95, 1, 1),
    '图腾': (1, 0.95, 1),
    '镰刀': (0.95, 1, 1),
    '战斧': (1.05, 0.9, 1),
    '匕首': (0.9, 0.95, 1),
    '双剑': (1.05, 0.9, 1),
    '手杖': (1, 1.05, 1),
    '苦无': (1, 1, 1),
    '长枪': (1, 1, 1),
    '战戟': (1.1, 0.9, 1),
    '光枪': (1, 1, 1),
    '暗矛': (0.95, 0.95, 1),
    '长刀': (1, 1, 1),
    '小太刀': (0.95, 1, 1),
    '重剑': (1.05, 1, 1),
    '源力剑': (1, 1, 1),
    # todo
    '神弦弓': (1, 1, 1),
    '玄机弓': (1, 1, 1),
    '重弩': (1.05, 1, 1),
    '妖影弓': (0.95, 0.95, 1)
}

MP系数 = {
    '短剑': (1, 1.15, 1),
    '太刀': (0.95, 1.05, 1),
    '钝器': (1.1, 0.95, 1),
    '巨剑': (1.2, 0.9, 1),
    '光剑': (0.9, 1, 1),
    '手套': (0.95, 1.15, 1),
    '臂铠': (1.2, 0.9, 1),
    '爪': (1, 1, 1),
    '拳套': (1.05, 0.95, 1),
    '东方棍': (0.95, 1, 1),
    '左轮枪': (1, 0.9, 1),
    '自动手枪': (0.7, 1.1, 1),
    '步枪': (1.1, 0.95, 1),
    '手炮': (1.25, 0.75, 1),
    '手弩': (0.9, 1, 1),
    '矛': (1.1, 0.95, 1),
    '棍棒': (1, 1, 1),
    '魔杖': (0.95, 1, 1),
    '法杖': (1, 1.1, 1),
    '扫把': (1, 1, 1),
    '十字架': (1, 0.95, 1),
    '念珠': (0.9, 1.15, 1),
    '图腾': (1.05, 0.9, 1),
    '镰刀': (0.95, 1, 1),
    '战斧': (1.2, 0.85, 1),
    '匕首': (1, 0.9, 1),
    '双剑': (1.2, 0.8, 1),
    '手杖': (0.95, 1.15, 1),
    '苦无': (1, 1.1, 1),
    '长枪': (1.1, 1, 1),
    '战戟': (1.2, 0.9, 1),
    '光枪': (1, 1.15, 1),
    '暗矛': (0.95, 1.05, 1),
    '长刀': (1.1, 1, 1),
    '小太刀': (1, 1, 1),
    '重剑': (1.2, 0.9, 1),
    '源力剑': (1, 1.15, 1),
    # todo
    '神弦弓': (1, 1, 1),
    '玄机弓': (1.1, 1, 1),
    '重弩': (1.2, 0.9, 1),
    '妖影弓': (0.95, 1, 1)
}


def 武器冷却惩罚(武器类型, 输出类型):
    类型系数 = (0 if 输出类型 == '物理百分比' else (1 if 输出类型 == '魔法百分比' else 2))
    return 武器冷却惩罚系数[武器类型][类型系数]
    # else:
    #     return 武器冷却惩罚系数_HF[武器类型][类型系数]


def 武器MP系数(武器类型, 输出类型, 版本='GF') -> float:
    类型系数 = (0 if 输出类型 == '物理百分比' else (1 if 输出类型 == '魔法百分比' else 2))
    if 版本 == 'GF':
        return MP系数[武器类型][类型系数]

# endregion

# region 防具

# 部位系数 = {'上衣': 0.30, '头肩': 0.20, '下装': 0.25, '腰带': 0.10, '鞋': 0.15}
# 品级加分 = {'稀有': 5, '神器': 8, '勇者': 11, '传说': 14, '史诗': 17, '智慧产物': 17, '神话': 18}


# def 精通计算(装备等级, 品质, 强化等级, 部位):
#     return round((20 + 2.5 * (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)

# def 辅助精通计算(装备等级, 品质, 强化等级, 部位):
#     return round((4 + (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)

甲类系数 = {'皮甲': 2.9,'板甲':2.9,'重甲':3.1,'轻甲':3.2,'布甲':3.2}
部位系数 = {'上衣': 0.30, '头肩': 0.20, '下装': 0.25, '腰带': 0.10, '鞋': 0.15}
品级加分 = {'稀有': 5, '神器': 8, '勇者': 11, '传说': 14, '史诗': 17, '智慧产物': 17, '神话': 18}

def 精通计算(装备等级, 品质, 强化等级, 部位, 甲类):
    return round((20 + 甲类系数[甲类] * (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)

def 辅助精通计算(装备等级, 品质, 强化等级, 部位, 属性):
    if 属性 == '智力':
        return round((8 + 2.4 * (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)
    if 属性 == '体力':
        return round((4 + 1.6 * (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)
    if 属性 == '精神':
        return round((8 + 0.8 * (装备等级 + 品级加分[品质] + int(强化等级 / 3))) * 部位系数[部位], 2)

# endregion

# region 词条基础成长


# 成长词条系数 = (0, 3, 5, 8, 10, 13, 16, 18, 21, 24, 34, 37, 40, 43, 46, 49, 51, 54, 56, 59, 74, 76, 79, 81, 84, 86, 88, 91, 93, 96, 109, 111, 113, 116,
#          118, 121, 123, 125, 128, 130, 143, 145, 148, 150, 152, 154, 156, 159, 161, 163, 174, 176, 178, 179, 181, 183, 185, 187, 188, 190, 199,
#          201, 203, 205, 207, 209, 211, 212, 214)
成长词条系数 = (1, 1.01913, 1.03856, 1.05796, 1.07705, 1.0966, 1.11555, 1.13502, 1.15463, 1.26582, 1.28489, 1.30429, 1.32348, 1.34284, 1.36231, 1.38139, 1.40079, 1.41987, 1.43941, 1.55071, 1.56832, 1.58644, 1.60413, 1.62212, 1.63976, 1.65739, 1.67545, 1.69321, 1.71125, 1.80769, 1.82541, 1.84309, 1.86113, 1.87874, 1.89694, 1.91448, 1.93209, 1.95008, 1.96782, 2.06436, 2.08055, 2.09719, 2.11341, 2.12971, 2.14602, 2.16218, 2.17885, 2.19506, 2.21141, 2.29302,
          2.30639, 2.31989, 2.33291, 2.34639, 2.35987, 2.37322, 2.38686, 2.3997, 2.4132, 2.48006, 2.49348, 2.50698, 2.52048, 2.53332, 2.54682, 2.56026, 2.57362, 2.58712, 2.60017, 2.66693, 2.68043, 2.69387, 2.70732, 2.72086, 2.73386, 2.74729, 2.76072, 2.77413, 2.78771, 2.85435, 2.86764, 2.88093, 2.89435, 2.90756, 2.92109, 2.93434, 2.9477, 2.96089, 2.97461, 3.04871, 3.06215, 3.07546, 3.08886, 3.10212, 3.11574, 3.12899, 3.14229, 3.15584, 3.16885, 3.24308, 3.25655, 3.27008, 3.28333, 3.29668, 3.30993, 3.32333, 3.33682, 3.34987, 3.36333, 3.43781, 3.45075, 3.46436, 3.47788, 3.49091, 3.50447, 3.51778, 3.53109, 3.54453, 3.55794, 3.63215)

# 奶成长词条系数 = (1, 1.0184, 1.0369, 1.0559, 1.0753, 1.093, 1.1125, 1.1308, 1.1493, 1.2602, 1.2794, 1.2975, 1.3168, 1.3353, 1.3546, 1.3731, 1.3919, 1.4107,
#            1.4294, 1.5397, 1.5565, 1.5733, 1.5898, 1.6065, 1.6232, 1.64, 1.6559, 1.6729, 1.6899, 1.7858, 1.8023, 1.8192, 1.8359, 1.8525, 1.8684, 1.8858,
#            1.9024, 1.9191, 1.9358, 2.0318, 2.0485, 2.0651, 2.0808, 2.0983, 2.1151, 2.1317, 2.1485, 2.1648, 2.1817, 2.263, 2.2755, 2.2875, 2.3003, 2.3131,
#            2.3256, 2.338, 2.3505, 2.3629, 2.3754, 2.4423, 2.4547, 2.467, 2.4798, 2.4915, 2.5041, 2.5173, 2.5297, 2.5421, 2.5548, 2.6193, 2.6314, 2.6444,
#            2.657, 2.6694, 2.6815, 2.6937, 2.706, 2.7187, 2.7309, 2.7948)


def 成长词条计算(基础, 等级,version = 0):
    # if 等级 > 81:
    #     raise ResponseException("目前最大支持到80级")
    if 等级 == 1:
        return 基础
    return round(134.715 * round(round(基础*10) / 134.715, 2) * 成长词条系数[min(119, 等级 - 1)])/10


def 奶成长词条计算(基础, 等级):
    return 成长词条计算(基础, 等级)


# endregion

# region 角色基础属性

当前等级 = 110

# 力量 体力 智力 精神
角色基础系数 = {
    '魔枪士': (4.6, 4.6, 4.4, 4.4, 7, 7, 5, 5),
    '格斗家(女)': (5, 5, 4, 4, 7.5, 7.5, 4.5, 4.5),
    '格斗家(男)': (5, 5, 4, 4, 7.5, 7.5, 4.5, 4.5),
    '枪剑士': (4.6, 4.6, 4.4, 4.4, 7, 7, 5, 5),
    '神枪手(女)': (4.5, 4.5, 4.5, 4.5, 6.5, 6.5, 5.5, 5.5),
    '神枪手(男)': (4.5, 4.5, 4.5, 4.5, 6.5, 6.5, 5.5, 5.5),
    '守护者': (4.8, 4.8, 4.2, 4.2, 7, 7, 5, 5),
    '魔法师(女)': (4, 4, 5, 5, 4.5, 4.5, 7.5, 7.5),
    '魔法师(男)': (3.5, 4, 5.5, 5, 4, 4.5, 8, 7.5),
    '暗夜使者': (5, 4, 5, 4, 7.5, 5.5, 6.5, 4.5),
    '缔造者': (4, 4, 5, 5, 4.5, 4.5, 7.5, 7.5),
    '黑暗武士': (4.8, 4.8, 4.2, 4.2, 7.5, 7.5, 4.5, 4.5),
    '鬼剑士(男)': (4.8, 4.8, 4.2, 4.2, 7.5, 7.5, 4.5, 4.5),
    '鬼剑士(女)': (4.6, 4.6, 4.4, 4.4, 7, 7, 5, 5),
    '圣职者(男)': (4.7, 4.8, 4, 4.5, 6.5, 6.5, 4.5, 6.5),
    '圣职者(女)': (4.7, 4.8, 4, 4.5, 6.5, 6.5, 4.5, 6.5),
    # todo
    '弓箭手': (4.6, 4.6, 4.4, 4.4, 7, 7, 5, 5)
}

# 力量 体力 智力 精神
职业基础数据 = {
    '征战者-魔枪士': (5.5, 5.5, 3.5, 3.5),
    '决战者-魔枪士': (5, 5, 4, 4),
    '狩猎者-魔枪士': (3, 4.5, 6, 4.5),
    '暗枪士-魔枪士': (3.5, 3.5, 5.5, 5.5),
    '气功师-格斗家(女)': (3.5, 3.5, 5.5, 5.5),
    '散打-格斗家(女)': (5.5, 5.5, 3.5, 3.5),
    '街霸-格斗家(女)': (5, 4, 5, 4),
    '柔道家-格斗家(女)': (5, 6, 3.5, 3.5),
    '气功师-格斗家(男)': (3.5, 3.5, 5.5, 5.5),
    '散打-格斗家(男)': (5.5, 5.5, 3.5, 3.5),
    '街霸-格斗家(男)': (5, 4, 5, 4),
    '柔道家-格斗家(男)': (5, 6, 3.5, 3.5),
    '暗刃-枪剑士': (5.5, 5.5, 3.5, 3.5),
    '特工-枪剑士': (5, 5, 4, 4),
    '战线佣兵-枪剑士': (5.2, 5, 3.5, 4.3),
    '源能专家-枪剑士': (3.5, 3.5, 5.5, 5.5),
    '漫游枪手-神枪手(女)': (5.5, 5.5, 3.5, 3.5),
    '枪炮师-神枪手(女)': (5.5, 5.5, 3.5, 3.5),
    '机械师-神枪手(女)': (3.5, 3.5, 5.5, 5.5),
    '弹药专家-神枪手(女)': (4.7, 4.3, 4.7, 4.3),
    '漫游枪手-神枪手(男)': (5.5, 5.5, 3.5, 3.5),
    '枪炮师-神枪手(男)': (5.5, 5.5, 3.5, 3.5),
    '机械师-神枪手(男)': (3.5, 3.5, 5.5, 5.5),
    '弹药专家-神枪手(男)': (4.7, 4.3, 4.7, 4.3),
    '合金战士-神枪手(男)': (5.5, 5.5, 3.5, 3.5),
    '精灵骑士-守护者': (5, 5, 4, 4),
    '混沌魔灵-守护者': (3.5, 3.5, 5.5, 5.5),
    '帕拉丁-守护者': (5, 5.5, 2, 5.5),
    '龙骑士-守护者': (5, 5, 4, 4),
    '元素师-魔法师(女)': (3.5, 3.5, 5.5, 5.5),
    '召唤师-魔法师(女)': (3.8, 3.7, 5.3, 5.2),
    '战斗法师-魔法师(女)': (5, 4, 5, 4),
    '魔道学者-魔法师(女)': (4.5, 4, 5.2, 4.3),
    '小魔女-魔法师(女)': (4.7, 4.8, 5.5, 4.5),
    '元素爆破师-魔法师(男)': (3.5, 3.5, 5.5, 5.5),
    '冰结师-魔法师(男)': (3.5, 3.7, 5.5, 5.2),
    '血法师-魔法师(男)': (5.5, 5.5, 3.5, 3.5),
    '逐风者-魔法师(男)': (5.5, 5.2, 3.5, 3.8),
    '次元行者-魔法师(男)': (3.5, 3.5, 5.5, 5.5),
    '刺客-暗夜使者': (5.3, 4.5, 4.2, 4),
    '死灵术士-暗夜使者': (4.7, 3.5, 5.3, 4.5),
    '忍者-暗夜使者': (4.5, 3.5, 5.5, 4.5),
    '影舞者-暗夜使者': (5.5, 4.5, 4, 4),
    '缔造者-魔法师(女)': (4, 4, 5, 5),
    '黑暗武士-鬼剑士(男)': (4.8, 4.8, 4.2, 4.2),
    '剑魂-鬼剑士(男)': (5, 5, 4, 4),
    '鬼泣-鬼剑士(男)': (3.5, 3.5, 5.5, 5.5),
    '狂战士-鬼剑士(男)': (5.5, 5.5, 3.5, 3.5),
    '阿修罗-鬼剑士(男)': (3, 4.5, 6, 4.5),
    '剑影-鬼剑士(男)': (5, 5, 4, 4),
    '刃影-鬼剑士(女)': (5, 5, 4, 4),
    '驭剑士-鬼剑士(女)': (5, 5, 4, 4),
    '暗殿骑士-鬼剑士(女)': (3.5, 3.5, 5.5, 5.5),
    '契魔者-鬼剑士(女)': (5.5, 5.5, 3.5, 3.5),
    '流浪武士-鬼剑士(女)': (5.5, 5.5, 3.5, 3.5),
    '圣骑士-圣职者(男)': (3.5, 5.5, 3.5, 5.5),
    '蓝拳圣使-圣职者(男)': (5.2, 5, 3.9, 3.9),
    '驱魔师-圣职者(男)': (5, 4, 5, 4),
    '复仇者-圣职者(男)': (3.5, 3.5, 5.5, 5.5),
    '圣骑士-圣职者(女)': (3.5, 5.5, 5.5, 3.5),
    '异端审判者-圣职者(女)': (5.2, 5, 3.5, 4.3),
    '巫女-圣职者(女)': (3.5, 3.5, 5.5, 5.5),
    '诱魔者-圣职者(女)': (3.5, 3.5, 5.5, 5.5),
    # todo
    '缪斯-弓箭手': (3.5, 5.5, 3.5, 5.5),
    '旅人-弓箭手': (5.5, 5.5, 3.5, 3.5),
    '猎人-弓箭手': (5.5, 5.5, 3.5, 3.5),
    '妖护使-弓箭手': (5.5, 5.5, 3.5, 3.5)
}

# 火抗 冰抗 光抗 暗抗

职业属性抗性数据 = {
    '征战者-魔枪士': (23, 23, 23, 23),
    '决战者-魔枪士': (23, 23, 23, 23),
    '狩猎者-魔枪士': (23, 23, 23, 23),
    '暗枪士-魔枪士': (23, 23, 23, 23),
    '气功师-格斗家(女)': (23, 23, 93, -7),
    '散打-格斗家(女)': (23, 23, 43, 3),
    '街霸-格斗家(女)': (23, 23, 43, 3),
    '柔道家-格斗家(女)': (23, 23, 43, 3),
    '气功师-格斗家(男)': (23, 23, 63, -7),
    '散打-格斗家(男)': (23, 23, 43, 3),
    '街霸-格斗家(男)': (23, 23, 43, 3),
    '柔道家-格斗家(男)': (23, 23, 43, 3),
    '暗刃-枪剑士': (23, 23, 23, 23),
    '特工-枪剑士': (23, 23, 23, 23),
    '战线佣兵-枪剑士': (23, 23, 23, 23),
    '源能专家-枪剑士': (23, 23, 23, 23),
    '漫游枪手-神枪手(女)': (23, 23, 23, 23),
    '枪炮师-神枪手(女)': (23, 23, 23, 23),
    '机械师-神枪手(女)': (23, 23, 23, 23),
    '弹药专家-神枪手(女)': (23, 23, 23, 23),
    '漫游枪手-神枪手(男)': (23, 23, 23, 23),
    '枪炮师-神枪手(男)': (23, 23, 23, 23),
    '机械师-神枪手(男)': (23, 23, 23, 23),
    '弹药专家-神枪手(男)': (23, 23, 23, 23),
    '合金战士-神枪手(男)': (23, 23, 23, 23),
    '精灵骑士-守护者': (28, 28, 28, 28),
    '混沌魔灵-守护者': (28, 28, 28, 28),
    '帕拉丁-守护者': (28, 28, 28, 28),
    '龙骑士-守护者': (28, 28, 28, 28),
    '元素师-魔法师(女)': (23, 23, 23, 23),
    '召唤师-魔法师(女)': (23, 23, 23, 23),
    '战斗法师-魔法师(女)': (23, 23, 23, 23),
    '魔道学者-魔法师(女)': (23, 23, 23, 23),
    '小魔女-魔法师(女)': (23, 23, 23, 23),
    '元素爆破师-魔法师(男)': (23, 23, 23, 23),
    '冰结师-魔法师(男)': (23, 23, 23, 23),
    '血法师-魔法师(男)': (23, 23, 23, 23),
    '逐风者-魔法师(男)': (23, 23, 23, 23),
    '次元行者-魔法师(男)': (23, 23, 23, 23),
    '刺客-暗夜使者': (23, 23, 23, 23),
    '死灵术士-暗夜使者': (23, 23, 3, 43),
    '忍者-暗夜使者': (31, 23, 23, 23),
    '影舞者-暗夜使者': (23, 23, 23, 23),
    '缔造者-魔法师(女)': (23, 23, 23, 23),
    '黑暗武士-鬼剑士(男)': (23, 23, 3, 43),
    '剑魂-鬼剑士(男)': (23, 23, 3, 43),
    '鬼泣-鬼剑士(男)': (23, 23, -7, 63),
    '狂战士-鬼剑士(男)': (23, 23, 3, 43),
    '阿修罗-鬼剑士(男)': (23, 23, 3, 43),
    '剑影-鬼剑士(男)': (23, 23, 3, 43),
    '刃影-鬼剑士(女)': (23, 23, 3, 43),
    '驭剑士-鬼剑士(女)': (23, 23, 3, 43),
    '暗殿骑士-鬼剑士(女)': (23, 23, 3, 43),
    '契魔者-鬼剑士(女)': (23, 23, 3, 43),
    '流浪武士-鬼剑士(女)': (23, 23, 3, 43),
    '圣骑士-圣职者(男)': (23, 23, 23, 23),
    '蓝拳圣使-圣职者(男)': (23, 23, 23, 23),
    '驱魔师-圣职者(男)': (23, 23, 23, 23),
    '复仇者-圣职者(男)': (23, 23, 23, 23),
    '圣骑士-圣职者(女)': (23, 23, 43, 23),
    '异端审判者-圣职者(女)': (23, 23, 23, 23),
    '巫女-圣职者(女)': (23, 23, 23, 23),
    '诱魔者-圣职者(女)': (23, 23, 23, 23),
    # todo
    '缪斯-弓箭手': (23, 23, 23, 23),
    '旅人-弓箭手': (23, 23, 23, 23),
    '猎人-弓箭手': (23, 23, 23, 23),
    '妖护使-弓箭手': (23, 23, 23, 23)
}

# 出血 中毒 灼伤 感电 冰冻 减速 眩晕 诅咒 失明 石化 睡眠 混乱 束缚
职业异常抗性数据 = {
    '征战者-魔枪士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '决战者-魔枪士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '狩猎者-魔枪士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '暗枪士-魔枪士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '气功师-格斗家(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0.05, 0, 0, 0, 0),
    '散打-格斗家(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '街霸-格斗家(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '柔道家-格斗家(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '气功师-格斗家(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0.05, 0, 0, 0, 0),
    '散打-格斗家(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '街霸-格斗家(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '柔道家-格斗家(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '暗刃-枪剑士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '特工-枪剑士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '战线佣兵-枪剑士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '源能专家-枪剑士': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '漫游枪手-神枪手(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '枪炮师-神枪手(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '机械师-神枪手(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '弹药专家-神枪手(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '漫游枪手-神枪手(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '枪炮师-神枪手(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '机械师-神枪手(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '弹药专家-神枪手(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '合金战士-神枪手(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '精灵骑士-守护者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '混沌魔灵-守护者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '帕拉丁-守护者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '龙骑士-守护者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '元素师-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '召唤师-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '战斗法师-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '魔道学者-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '小魔女-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0),
    '元素爆破师-魔法师(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '冰结师-魔法师(男)': (0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0),
    '血法师-魔法师(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '逐风者-魔法师(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '次元行者-魔法师(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '刺客-暗夜使者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '死灵术士-暗夜使者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '忍者-暗夜使者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '影舞者-暗夜使者': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '缔造者-魔法师(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '黑暗武士-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '剑魂-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '鬼泣-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '狂战士-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0.95, 0, 0),
    '阿修罗-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0),
    '剑影-鬼剑士(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '刃影-鬼剑士(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '驭剑士-鬼剑士(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '暗殿骑士-鬼剑士(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '契魔者-鬼剑士(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '流浪武士-鬼剑士(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '圣骑士-圣职者(男)': (0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0, 0.05),
    '蓝拳圣使-圣职者(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '驱魔师-圣职者(男)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '复仇者-圣职者(男)': (0, 0, 0, 0, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3),
    '圣骑士-圣职者(女)': (0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05),
    '异端审判者-圣职者(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '巫女-圣职者(女)': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '诱魔者-圣职者(女)': (0, 0, 0, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5),
    # todo
    '缪斯-弓箭手': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '旅人-弓箭手': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '猎人-弓箭手': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    '妖护使-弓箭手': (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
}


def 获取基础属性(角色, 职业):

    角色数据 = 角色基础系数[角色]
    职业数据 = 职业基础数据[职业 + '-' + 角色]

    唤醒 = (335 if 当前等级 >= 75 else (145 if 当前等级 >= 15 else 0))

    # 力量 = int(角色数据[4] + 角色数据[0] * min(14, 当前等级 - 1) +
    #          职业数据[0] * max(当前等级 - 15, 0) + 唤醒 + 2.1 * min(71, 当前等级))
    # 体力 = int(角色数据[5] + 角色数据[1] * min(14, 当前等级 - 1) +
    #          职业数据[1] * max(当前等级 - 15, 0) + 唤醒 + 2.0 * min(71, 当前等级))
    # 智力 = int(角色数据[6] + 角色数据[2] * min(14, 当前等级 - 1) +
    #          职业数据[2] * max(当前等级 - 15, 0) + 唤醒 + 2.1 * min(71, 当前等级))
    # 精神 = int(角色数据[7] + 角色数据[3] * min(14, 当前等级 - 1) +
    #          职业数据[3] * max(当前等级 - 15, 0) + 唤醒 + 2.0 * min(71, 当前等级))
    力量 = int(角色数据[4] + 角色数据[0] * min(14, 当前等级 - 1) + 职业数据[0] * max(当前等级 - 15, 0) + 唤醒 + 93 + 当前等级)
    体力 = int(角色数据[5] + 角色数据[1] * min(14, 当前等级 - 1) + 职业数据[1] * max(当前等级 - 15, 0) + 唤醒 + 93 + 当前等级)
    智力 = int(角色数据[6] + 角色数据[2] * min(14, 当前等级 - 1) + 职业数据[2] * max(当前等级 - 15, 0) + 唤醒 + 93 + 当前等级)
    精神 = int(角色数据[7] + 角色数据[3] * min(14, 当前等级 - 1) + 职业数据[3] * max(当前等级 - 15, 0) + 唤醒 + 93 + 当前等级)
    return (力量, 智力, 体力, 精神)


def 获取属性抗性基础(角色, 职业):
    return 职业属性抗性数据[职业 + '-' + 角色]


def 获取异常抗性基础(角色, 职业):
    return 职业异常抗性数据[职业 + '-' + 角色]


刀魂之卡赞 = (
    0, 31, 40, 48, 58, 67, 79, 90, 103, 116, 131, 145, 161, 178, 194, 212, 230,
    250, 270, 292, 313
)

部位列表 = ("上衣", "头肩", "下装", "腰带", "鞋", "手镯", "项链", "戒指", "耳环", "辅助装备", "魔法石",
        "武器")

# endregion

